Skip to content

Instantly share code, notes, and snippets.

@g-berthiaume
g-berthiaume / Useful GCC Compiler Options.md
Created December 31, 2018 18:27
A useful list of gcc compiler options

Useful GCC Compiler Options

A non exhaustive list of gcc compiler options.

$ gcc myprog.c -o myprog -Wall -Wextra -pedantic -std=c11 [...]

Optimization:

@kashifulhaque
kashifulhaque / NvChad.md
Last active May 13, 2024 13:55
Neovim stuff with NvChad

Neovim keybinds

  • Capital letters do the opposite of small letters in command (Press shift to trigger capital letters)
  • _ (underscore) to move the cursor at the beginning of line (doesn't switch to insert mode)
    • 0 (zero) moves the cursor to the zeroth position of the line (doesn't switch to insert mode)
  • $ (dollar) to move the cursor at the end of line (doesn't switch to insert mode)
  • d$ will delete from wherever your cursor is till the end of the line
  • f<character> to move cursor to the first occurrence of <character>
    • f( to move cursor to first occurence of (
  • t<character> to move cursor to upto but not on the first occurrence of <character>
  • t( to move cursor to first occurence of (
@sholloway
sholloway / SOQL Queries.sql
Last active May 13, 2024 13:51
Useful SOQL queries for exploring a Salesforce org.
--------------------------------------------------------------------
-- Queries related to distribution of metadata.
-- Find the number of users per profile.
SELECT count(id), Profile.name
FROM User
WHERE User.IsActive = true
GROUP BY Profile.name
-- Find the distribution of Apex classes per namespace.
select count(id), NameSpacePrefix
@dishapatel010
dishapatel010 / gptmd.js
Created May 13, 2024 12:55
Bookmarklet for saving chatgpt conversion to markdown
javascript:(function() {
  function h(html) {
    return html.replace(/<p>/g, "\n")
               .replace(/<\/p>/g, "\n")
               .replace(/<b>/g, "**")
               .replace(/<\/b>/g, "**")
               .replace(/<strong>/g, "**")
               .replace(/<\/strong>/g, "**")
               .replace(/<i>/g, "_")
               .replace(/<\/i>/g, "_")
@letanure
letanure / estados-cidades.json
Last active May 13, 2024 13:51
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@kabili207
kabili207 / Rclone systemd service.md
Last active May 13, 2024 13:48
Rclone systemd user service

rclone systemd service

Preparation

This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.

Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.

mkdir ~/mnt/dropbox
@dunderrrrrr
dunderrrrrr / GeoIP Block NGINX Ubuntu 20.04.md
Created April 19, 2021 08:28
Allow or block GeoIP in Nginx on Ubuntu 20.04

GeoIP Block NGINX Ubuntu 20.04

Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip geoip-database
@simpla
simpla / calcular_cuit.php
Last active May 13, 2024 13:42
Calcular y Validar el número de CUIT/CUIL en Argentina
<?php
/**
* Cálculo de CUIT/CUIL. La función no tiene en cuenta la posibilidad
* de CUITs repetidos ya que no tiene acceso a la DB de registros (puede
* ocurrir ya que algunos DNI coinciden con las LE y LC)
*
* @param char $tipo: tipo de CUIT, puede valer H, M y E (hombre, mujer, empresa)
* @param string $dni: número de DNI (a las empresas, la AFIP les asigna un nro.)
* @return string con el CUIT sin guiones o false en caso de error
@nrrrdcore
nrrrdcore / inset_input.css
Created August 9, 2012 23:35
The Perfect Inset Input CSS
input {
height: 34px;
width: 100%;
border-radius: 3px;
border: 1px solid transparent;
border-top: none;
border-bottom: 1px solid #DDD;
box-shadow: inset 0 1px 2px rgba(0,0,0,.39), 0 -1px 1px #FFF, 0 1px 0 #FFF;
}
@eduardoflorence
eduardoflorence / main.dart
Created December 24, 2020 20:03
GetX - Sample GetConnect
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(GetMaterialApp(
initialRoute: '/home',
getPages: [
GetPage(
name: '/home',
page: () => HomePage(),